import allure
import pytest
import requests

from common.base_request import BaseRequest
from common.yaml_opt import YamlTools
sess =requests.session()
Skudata =YamlTools.read_yaml_file("Sku.yaml")[0]
@pytest.mark.parametrize("mySkudata",Skudata["parametrize"])
def testbanklogin(mySkudata):
    # print(mylogindata)
    data = mySkudata["data"]
    allure.dynamic.title(mySkudata["title"])
    res = BaseRequest.execute_api_request(request=Skudata["request"],parametrize=mySkudata)
    print(res.json())
    assert res.json()["code"] == mySkudata["expect"]["code"]